<!DOCTYPE html>
<script src="../include.js"></script>

<canvas id="canvas" width="100" height="50"> </canvas>
<script>
    test(() => {
        try {
            const canvas = document.getElementById("canvas");
            const context = canvas.getContext("2d");
            var gradient = context.createLinearGradient(0, 0, 100, 0);
            gradient.addColorStop(0, "color(srgb 1 0 0)");
            gradient.addColorStop(1, "color(srgb 0 1 0)");
            println("PASS");
        } catch (e) {
            println("FAIL");
        }
    });
</script>
